import OrderIndex from '@/components/order/index.vue'
import OrderInfo from '@/components/order/info.vue'
import OrderExpress from '@/components/order/express.vue'
import OrderRefund from '@/components/order/refund.vue'
import OrderRefundinfo from '@/components/order/refundinfo.vue'
import OrderRefundgoods from '@/components/order/refundgoods.vue'
import OrderRate from '@/components/order/rate.vue'
import OrderComment from '@/components/order/comment.vue'

// 定义一个路由列表(子路由)

const list = [
    {
        name: 'OrderIndex',
        path: 'index', //生成路由地址 ： /order/index
        component: OrderIndex,
        meta:{login:true}
    },    
    {
        name: 'OrderInfo',
        path: 'info', //生成路由地址 ： /order/info
        component: OrderInfo,
        meta:{login:true}
    },    
    {
        name: 'OrderExpress',
        path: 'express', //生成路由地址 ： /order/express
        component: OrderExpress,
        meta:{login:true}
    },    
    {
        name: 'OrderRefund',
        path: 'refund', //生成路由地址 ： /order/refund
        component: OrderRefund,
        meta:{login:true}
    },
    {
        name: 'OrderRefundinfo',
        path: 'refundinfo',
        component: OrderRefundinfo,
        meta:{login:true}
    },
    {
        name: 'OrderRefundgoods',
        path: 'refundgoods',
        component: OrderRefundgoods,
        meta:{login:true}
    },
    {
        name: 'OrderRate',
        path: 'rate',
        component: OrderRate,
        meta:{login:true}
    },
    {
        name: 'OrderComment',
        path: 'comment',
        component: OrderComment,
        meta:{login:true}
    },
]

//父级的组件模板
const layout = {
    template: '<router-view></router-view>'
}

export default [
    {
        name: 'order',
        path: '/order',
        component: layout,
        children: list,
    }
]